
local style = lv.create_style()

lv.style_set_flex_flow( style, lv.LV_FLEX_FLOW_ROW_WRAP );

lv.style_set_flex_main_place( style, lv.LV_FLEX_ALIGN_SPACE_EVENLY );

lv.style_set_layout( style, lv.get_lv_layout_flex() );

local cont = lv.obj_create( lv.scr_act() );

lv.obj_set_size( cont, 300, 220 );

lv.obj_center( cont );

lv.obj_add_style( cont, style, 0 );

for i = 0, 7 do

	local obj = lv.obj_create( cont );

        lv.obj_set_size( obj, 70, lv.LV_SIZE_CONTENT );

        local label = lv.label_create( obj );

        lv.label_set_text( label, string.format( "%d", i ) );

        lv.obj_center( label );
end
